import request from "@/utils/request"
const BASE_URL = process.env.VUE_APP_BASE_URL

/**
 * 域名配置
 * @param {*} data
 */
export function adminCompanyManagerSetDomainAPI(data) {
	return request({
		url: BASE_URL + "adminCompanyManager/setCompanyDoMain",
		method: "post",
		data: data
	})
}

/**
 * 根据域名查询logo和名称
 * @param {*} data
 */
export function adminCompanyManagerQueryLogoAPI(data) {
	return request({
		url: BASE_URL + "adminCompanyManager/queryCompanyLogoByDomain",
		method: "post",
		data: data
	})
}

/**
 * @description: 发送邮件进行验证
 * @param {*} email
 * @return {*}
 */
export function adminCompanyManagerSetEmailAPI(email) {
	return request({
		url: BASE_URL + "adminCompanyManager/setEmailInfo",
		method: "post",
		data: { email }
	})
}

/**
 * @description: 验证邮箱信息
 * @param {*} k 邮箱跳转进入时携带的参数
 * @return {*}
 */
export function adminCompanyManagerVerifyEmailAPI(k) {
	return request({
		url: BASE_URL + `adminCompanyManager/verifyEmailInfo/?k=${k}`,
		method: "get"
	})
}

/**
 * @description: 查询账号是否已验证
 * @return {*}
 */
export function adminCompanyManagerQueryUserVerifyAPI() {
	return request({
		url: BASE_URL + "adminCompanyManager/queryUserVerify",
		method: "post"
	})
}

/**
 * @description: 验证当前账号信息
 * @return {*}
 */
export function adminCompanyManagerVerifyUserAPI(data) {
	return request({
		url: BASE_URL + "adminCompanyManager/verifyUser",
		method: "post",
		data
	})
}
